package cn.stylefeng.guns.modular.business.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 批次订单
 * </p>
 *
 * @author jwj
 * @since 2019-09-09
 */
@TableName("c_batch_order")
@Data
public class BatchOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "batch_id", type = IdType.AUTO)
    private Integer batchId;

    /**
     * 批次编号
     */
    @TableField("batch_no")
    private String batchNo;

    /**
     * 批次面值
     */
    @TableField("batch_quota")
    private Integer batchQuota;

    /**
     * 提交数量
     */
    @TableField("batch_count")
    private Integer batchCount;

    /**
     * 提交的面值总和
     */
    @TableField("sub_all_quota")
    private Integer subAllQuota;

    /**
     * 提交订单数量
     */
    @TableField("sub_order_num")
    private Integer subOrderNum;

    /**
     * 处理中的订单，处理完成1个减1
     */
    @TableField("sub_doing_num")
    private Integer subDoingNum;

    /**
     * 已成功订单
     */
    @TableField("sucess_order_num")
    private Integer sucessOrderNum;

    /**
     * 已失败订单
     */
    @TableField("fail_order_num")
    private Integer failOrderNum;

    /**
     * 处理状态，0处理中，1已完成
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    @TableField("card_type_id")
    private Long cardTypeId;

    @TableField("card_type_name")
    private String cardTypeName;

    @TableField("card_cataory_id")
    private Long cardCataoryId;

    @TableField("card_cataory_name")
    private String cardCataoryName;

    @TableField("card_quota_id")
    private Integer cardQuotaId;


    @TableField("card_quota_name")
    private String cardQuotaName;

    @TableField("card_no_pwd")
    private String cardNoPwd;

    @TableField("card_owner")
    private String cardOwner;

    @TableField("card_owner_id")
    private Long cardOwnerId;

    @TableField("pay_rate")
    private Float payRate;

    /**
     * 成功提交订单
     */
    @TableField("sub_success_order_num")
    private Integer subSuccessOrderNum;

    /**
     * 未成功提交订单
     */
    @TableField("sub_fail_order_num")
    private Integer subFailOrderNum;

    /**
     * 未成功提交订单
     */
    @TableField("sub_fail_order_reason")
    private String subFailOrderReason;

    @Override
    public String toString() {
        return "BatchOrder{" +
        "batchId=" + batchId +
        ", batchNo=" + batchNo +
        ", batchQuota=" + batchQuota +
        ", batchCount=" + batchCount +
        ", subAllQuota=" + subAllQuota +
        ", subOrderNum=" + subOrderNum +
        ", subDoingNum=" + subDoingNum +
        ", sucessOrderNum=" + sucessOrderNum +
        ", failOrderNum=" + failOrderNum +
        ", status=" + status +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        ", cardTypeId=" + cardTypeId +
        ", cardTypeName=" + cardTypeName +
        ", cardCataoryId=" + cardCataoryId +
        ", cardCataoryName=" + cardCataoryName +
        "}";
    }
}
